<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>    
<div class="top-header">
    <div class="section">
        <div class="top-header-left f-left">
            <a href="#">LOGO</a>
        </div>
        <div class="top-header-right f-right">
           <c:choose>
              <c:when test="${empty sessionScope.vipUserSession }">
              	     <a href="${pathUrl }/home/index/login">登录</a>
          			  <a href="${pathUrl }/home/index/register">注册</a>
              </c:when>
              <c:otherwise>
               	<img class="user-img-toux" src="${pathUrl }${vipUserSession.userImg }"/>${vipUserSession.username}
               	<a href="${pathUrl }/home/index/exit">注销</a>
              </c:otherwise>
           </c:choose>
            <a href="${pathUrl }/admin/toLogin" target="_blank">后台</a>
        </div>
    </div>
</div>

<div class="section nav-header">
    <ul class="nav-menus f-left">
        
        <li><a href="${pathUrl }/home/index/index" ${ (empty  navActive) || navActive eq 0?"class='active'":'' }>首页</a></li>
        <li><a href="${pathUrl }/home/goods/index" ${ navActive eq 1?"class='active'":'' }>产品列表</a></li>
        <li><a href="${pathUrl }/home/cart/index" ${ navActive eq 2?"class='active'":'' } >购物车</a></li>
        <li><a href="${pathUrl }/home/center/index" ${ navActive eq 3?"class='active'":'' } >会员中心</a></li>
        <li><a href="${pathUrl }/home/news/index" ${ navActive eq 4?"class='active'":'' }>新闻资讯</a></li>
        <li><a href="${pathUrl }/home/contact/index" ${ navActive eq 5?"class='active'":'' }>联系我们</a></li>
    </ul>
    <div class="f-right nav-right">
        <input type="text" id="seachername" name="name" value="${name}" class="seacher-input f-left" placeholder="输入关键字">
        <a class="seacher-but  f-left" onclick="seacher()" >搜索</a>
    </div>
</div>
<script type="text/javascript">
	function seacher(){
	  var seachername=document.getElementById("seachername").value;
	  window.location.href="${pathUrl }/home/news/index?index&name="+seachername;
	}
</script>
